<style type="text/css">
  .list-group-item:hover {
    color: #337ab7;
    text-shadow: 0 0 1em #337ab7;
    cursor: pointer;
  }

  .listgroupitemselected {
    border: 6px;
    border-color: black;
    background-color: #337ab7;
    color: white;
    cursor: pointer;
  }
pre {
  white-space: pre-wrap;
}

pre.collapsed {
    height: 100px; /* height for 4 lines */
    overflow: hidden;
}

pre.expanded {
    height: auto;
    overflow: auto;
}  
  /* pre {
    white-space: pre-wrap;

  }
  pre.collapsed {
    height: 100px;
    overflow: hidden;
  }
  pre.expanded {
    height: auto;
    overflow: auto;
  } */
</style>

<pre ng-show="ErrorMessage!=null">{{ ErrorMessage }}</pre>
<div ng-show="ctrl.errormessage != ''"" class=" alert alert-danger" role="alert">{{ctrl.errormessage}}</div>

<div class="shadow card">
  <form ng-submit="ctrl.submit()" class="form-horizontal" role="form" autocomplete="off">

    <div class="col-sm">
      <label for="name" class="required" translate lib="web">agent</label>
      <select id="agents" ng-model="ctrl.id" ng-disabled="ctrl.loading==true" class="form-control"
        ng-options="item._id as item.name for item in ctrl.agents" ng-change="ctrl.AgentUpdated()">
      </select>
    </div>
    <div class="col-sm">
      <label for="name" translate lib="web">agent languages</label>
      {{ctrl.languages}}
    </div>
    <div class="col-sm">
      <label for="name" translate lib="web">has chrome/chromium</label>
      {{ctrl.haschrome}} / {{ctrl.haschromium}}
    </div>
    <div class="col-sm">
      <label for="name" class="required" translate lib="web">package</label>
      <select id="packages" ng-model="ctrl.package" ng-disabled="ctrl.loading==true" class="form-control"
        ng-options="item._id as item.name for item in ctrl.packages" ng-change="ctrl.packageUpdated()">
      </select>
    </div>

    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <button type="submit" ng-disabled="ctrl.loading==true || (ctrl.agent == '' || ctrl.package == '' )" class="ml-auto btn btn-success" translate
          lib="web">Run</button>
      </div>
    </div>

  </form>
</div>
<div id="runs">
</div>
